package com.wt.admin.service.chart.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wt.admin.domain.dto.chat.ChatModelDTO;
import com.wt.admin.domain.dto.chat.ChatModelFileDTO;
import com.wt.admin.domain.entity.chat.ChatModelFileEntity;
import com.wt.admin.domain.vo.chart.ChatModelFileVO;
import com.wt.admin.mapper.chat.ChatModelFileMapper;
import com.wt.admin.service.chart.ChatModelFileService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class ChatModelFileServiceImpl extends ServiceImpl<ChatModelFileMapper, ChatModelFileEntity> implements ChatModelFileService {

    @Resource
    private ChatModelFileMapper chatModelFileMapper;

    @Override
    public void delByModelId(ChatModelDTO data) {
        chatModelFileMapper.delByModelId(data.getId());
    }

    @Override
    public List<ChatModelFileVO> modeFileList(ChatModelFileDTO data) {
        return chatModelFileMapper.modeFileList(data);
    }

    @Override
    public ChatModelFileVO modeFileDel(List<String> data) {
        removeBatchByIds(data);
        return null;
    }

    @Override
    public ChatModelFileEntity saveOne(ChatModelFileEntity chatModelFileEntity) {
        save(chatModelFileEntity);
        return chatModelFileEntity;
    }

    @Override
    public void batchSave(List<ChatModelFileEntity> list) {
        saveBatch(list);
    }

    @Override
    public List<ChatModelFileEntity> listFile() {
        return chatModelFileMapper.listFile();
    }

}
